/*
 * Copyright 2019 Zhang XueHai
 * you may not use this file except in compliance with the License.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.zhangxuehai.android.pdfviewer.annotation;

import android.graphics.RectF;
import com.zhangxuehai.android.pdfviewer.annotation.pen.Pen;
import com.shockwave.pdfium.util.Size;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 标记注释（下划线，删除线，高亮等），记录区域矩形，坐标基于pdf坐标
 * @author 章学海
 * @date 2019/12/31
 */
public final class MarkAnnotation extends BaseAnnotation<List<RectF>, Pen.MarkPen> {
    public int startIndex;
    public int endIndex;

    public MarkAnnotation(int page, Size pageSize, Pen.MarkPen pen, int startIndex, RectF rectF) {
        super(AnnotationType.MARK,page,pageSize, pen);
        data = new ArrayList<>();
        this.startIndex = startIndex;
        this.endIndex = startIndex;
        this.data = Arrays.asList(rectF);
    }

    public void upada(int endIndex,List<RectF> rects){
        this.endIndex = endIndex;
        this.data = rects;
    }


}
